import 'package:base/widgets/widgets.dart';
import 'package:flutter/material.dart';

class RadioButton extends StatelessWidget {
  const RadioButton({
    Key? key,
    this.isChecked = true,
    required this.icon,
    required this.checkedIcon,
    this.size = 15,
    this.onTap,
  }) : super(key: key);
  final bool isChecked;
  final String icon;
  final double size;
  final String checkedIcon;
  final Function()? onTap;

  String _asset() {
    return isChecked ? checkedIcon : icon;
  }

  @override
  Widget build(BuildContext context) {
    return ImageButton(
      imgStrRes: _asset(),
      imgWidth: size,
      imgHeight: size,
      onTap: onTap,
    );
  }
}
